home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-02-18 | 43.7 KB | 1,025 lines | [TEXT/MPS ] |
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /*
- Apple Macintosh Developer Technical Support
-
- MultiFinder-Aware SoundApp Application
-
- SoundApp
-
- SoundApp.r - Rez Source
-
- Jim Reekes - Macintosh Developer Technical Support
- Copyright © 1989-1994 Apple Computer, Inc.
- All rights reserved.
-
- Versions:
- 1.03 January, 1990
- 1.04 Sept, 1990
- 1.2 August, 1994 translated to C
-
- Components:
- SoundApp.c January, 1990 MPW C source code
- SoundUnit.c January, 1990 MPW C source code
- SoundUnit.h January, 1990 MPW C source code
- SoundApp.r January, 1990 MPW Rez source code
- SoundAppSnds.r January, 1990 MPW Rez source code
- SoundApp.make January, 1990 MPW build script
-
- Formatting was done with FONT = Courier or Monaco, SIZE = 10, TABS = 4
-
- SoundApp.p is a sample application source file for demonstrating
- the Sound Manager. It requires the use of the SoundUnit to handle
- all of the sound routines. This portion of the source code handles the
- application’s management of memory, errors, user interface, etc..
-
- Jim Reekes E.O., Macintosh Developer Technical Support
- Sunday, August 7, 1994 7:06:41 PM
- */
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // INCLUDES
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- #include "Types.r"
- #include "SysTypes.r"
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // CONSTANTS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- // These #defines are used to set enable/disable flags of a menu
- #define AllItems 0b1111111111111111111111111111111 /* 31 bits worth of flags */
- #define NoItems 0b0000000000000000000000000000000
- #define MenuItem1 0b0000000000000000000000000000001
- #define MenuItem2 0b0000000000000000000000000000010
- #define MenuItem3 0b0000000000000000000000000000100
- #define MenuItem4 0b0000000000000000000000000001000
- #define MenuItem5 0b0000000000000000000000000010000
- #define MenuItem6 0b0000000000000000000000000100000
- #define MenuItem7 0b0000000000000000000000001000000
- #define MenuItem8 0b0000000000000000000000010000000
- #define MenuItem9 0b0000000000000000000000100000000
- #define MenuItem10 0b0000000000000000000001000000000
- #define MenuItem11 0b0000000000000000000010000000000
- #define MenuItem12 0b0000000000000000000100000000000
-
-
- /* These values are used in SIZE resource. */
-
- #define kMinSize 150 /*application’s minimum size (in K)*/
- #define kPrefSize 300 /*application’s preferred size (in K)*/
-
- /* This is the standard amount of white pixels around the inside edge of dialogs. */
-
- #define kStandardWhiteSpacing 13
-
- /* static text and edit text items height */
-
- #define kStandardTextHeight 16
-
- /* This is the rectangle of where to place the icon in an alert. */
-
- #define kStdAlertIconTop kStandardWhiteSpacing
- #define kStdAlertIconLeft 23
- #define kIconWidthOrHeight 32
-
- #define kStdAlertIconRect {kStdAlertIconTop, kStdAlertIconLeft, kStdAlertIconTop+kIconWidthOrHeight, kStdAlertIconLeft+kIconWidthOrHeight}
-
- /* These constants are the size of a standard button and the default button.*/
-
- #define kButtonFrameInset -4 /* inset rectangle adjustment around button */
- #define kButtonSizeW 59
- #define kButtonSizeH 20
- #define kDafaultButSizeW (kButtonSizeW - kButtonFrameInset - kButtonFrameInset)
- #define kDafaultButSizeH (kButtonSizeH - kButtonFrameInset - kButtonFrameInset)
-
- /* These constants are used in defining the size of the application’s windows.
- All of the following windows are dymanically positioned on screen by
- the application. These values will change the height and width of the windows. */
-
- #define kExitAlertSizeH 136
- #define kExitAlertSizeW 248
- #define kUserAlertSizeH 129
- #define kUserAlertSizeW 304
- #define kSoundVolSizeH 110
- #define kSoundVolSizeW 278
- #define kAboutWindowSizeH 232
- #define kAboutWindowSizeW 336
- #define kStatusWindowSizeH 103
- #define kStatusWindowSizeW 240
- #define kGetNameDialogSizeH 112
- #define kGetNameDialogSizeW 254
-
-
- /*
- Believe it or not, I found this complication to be very useful.
- Normally, people tend to use ResEdit to change the layout of a window
- especially for dialogs. I have a difficult time getting the pixels
- exactly right using ResEdit. People said I could then DeRez the window
- and make the adjustments. This was just a difficult. I needed some
- scratch paper and a calculator. After thinking about it, I wrote these
- definitions of my window’s geometry. This ended up in a scheme that I
- found to be much more helpful in building the exact window I wanted. The
- document window has all items spaced apart from each a consistent amount.
- The size of the items are consistent and spaced equally apart from each
- other.
-
- VERSION 1.1: The height of the window defaults NOT to show the last button
- which is used for recording. Typically, I suspect that most of the time
- the Sound Input Manager will not be present. Thus I'm going to hide the
- record button. If the application determines that Sound Input is available
- then it resizes the window to show the record button.
- */
-
- #define kNumOfButtons 6 /* the number of buttons in the window */
- #define kSndButtonSizeW 110 /* SizeW of buttons in document window */
- #define kSndButtonSizeH 22 /* heigth of buttons in document window */
- #define kSndListButGap (16 + (2 * kStandardWhiteSpacing)) /* list’s scroll bar and more */
- #define kSoundWindowSizeH ((kNumOfButtons * (kStandardWhiteSpacing + kSndButtonSizeH)) + kStandardWhiteSpacing)
- #define kSoundWindowSizeW 296
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // RESOURCE ID NUMBERS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // ALRT resources
- #define rExitAlert 1000 /*emergency exit user alert*/
- #define rUserAlert 1001 /*error message user alert*/
- #define rSoundVol 1002 /*volume too low message*/
- #define rSaveAlert 1003 /*save this document?*/
-
- // DLOG resources
- #define rGetNameDLOG 2000 /*get name for sound dialog*/
- #define rCustomGetFileDLOG 2001 /*CustomGetFile dialog*/
-
- // BNDL resource information
- #define rAppBundle 1000 /*application’s bundle resource ID*/
- #define rAppSignature 'SAPP' /*applicaiton’s OS signature*/
- #define rSndAppDocType 'sDoc' /*document's file type*/
-
- // CNTL resources
- #define rCancelCntl 1000 /*button ID for the status window*/
- #define rPlaySndCntl 1001 /*button ID for the document window*/
- #define rHyperPlayCntl 1002 /*button ID for the document window*/
- #define rPlayScaleCntl 1003 /*button ID for the document window*/
- #define rPlayMelodyCntl 1004 /*button ID for the document window*/
- #define rStopCntl 1005 /*button ID for the document window*/
- #define rRecordCntl 1006 /*button ID for the document window*/
- #define rAboutOKCntl 1007 /*button ID for the about window*/
-
- // CURS resources
- #define rSndCursor 1000 /*document cursor ID*/
- #define rACursor1 1001 /*animated cursor ID*/
- #define rACursor2 1002 /*animated cursor ID*/
- #define rACursor3 1003 /*animated cursor ID*/
- #define rACursor4 1004 /*animated cursor ID*/
-
- // ICON resources
- #define rNoteIcon 1 /*the note icon*/
- #define rCautionIcon 2 /*the caution icon*/
- #define rMoofIcon 1000 /*application ID for all the icon types*/
- #define rSndDocIcon 1001 /*document ID for all the icon types*/
-
- // MENU resources. The following constants have a “m” prefix to notate they’re menus.
- #define rMenuBar 1000 /*application’s menu bar*/
- #define mApple 128 /*Apple menu*/
- #define mFile 129 /*File menu*/
- #define mEdit 130 /*Edit menu*/
- #define mDemos 1000 /*Demo menu*/
-
- // PICT resources
- #define rAppPict 1000 /*picture appearing in about window*/
-
- // RECT resources, custom made to order
- #define rListRectID 1000 /*size of list rectangle*/
-
- // STR resources
- #define rUntitled 1000 /*string for untitled snd resources*/
- #define rAboutText 1001 /*string for text appearing in about window*/
- #define rPutFileMsg 1002 /*string for text appearing in SFPutFile dialog*/
-
- // STR# resources. The following constants have a “s” prefix to notate they’re strings.
- #define sErrStrings 1000 /*error strings STR# ID*/
- #define sMessStrings 1001 /*message strings STR# ID for status window*/
- #define sSMErrStrings 1002 /*message strings of Sound Manager errors*/
-
- // WIND resources. All windows used in the application need a unique resource ID.
- #define rAboutWindow 1000 /*about dialog*/
- #define rStatusWindow 1001 /*status window ID used to show current sound*/
- #define rSoundWindow 1002 /*sound document window ID*/
-
-
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- // RESOURCE DEFINITIONS
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is the vers resource used by the Finder in the Get Info window.
- I also display the short version number in the about window. */
-
- resource 'vers' (1, purgeable) {
- 0x1, 0x20, beta, 0x1, verUs, "1.2b1", "1.2b1, Copyright © 1989-94 Apple Computer"
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the animated cursors. They are preloaded
- and non-purgeable to help reduce memory fragmentation. */
-
- resource 'acur' (0, preload, nonPurgeable) {
- {rACursor1, rACursor2, rACursor3, rACursor4}
- };
-
- resource 'CURS' (rACursor1, preload, nonPurgeable) {
- $"00 00 00 00 00 00 16 00 3E 01 54 03 C3 05 F3 FD"
- $"08 FA 0C 72 0C 02 0D F2 0A 0A 0A 0A 0A 0A 1C 1E",
- $"00 00 00 00 00 00 16 00 3E 01 7C 03 FF 07 FF FF"
- $"0F FE 0F FE 0F FE 0F FE 0E 0E 0E 0E 0E 0E 1C 1E",
- {4, 10}
- };
-
- resource 'CURS' (rACursor2, preload, nonPurgeable) {
- $"30 30 28 38 24 24 13 AC 0B C6 04 0C 02 36 02 36"
- $"02 E0 02 E0 0E E0 10 60 26 20 29 90 28 50 30 38",
- $"30 30 38 38 3C 3C 1F BC 0F FE 07 FC 03 F6 03 F6"
- $"03 E0 03 E0 0F E0 1F E0 3F E0 39 F0 38 70 30 38",
- {15, 7}
- };
-
- resource 'CURS' (rACursor3, preload, nonPurgeable) {
- $"00 00 06 C0 0A A0 12 90 14 58 17 D8 20 18 27 18"
- $"4F 18 9F CF E0 C3 80 2A 00 FC 00 D0",
- $"00 00 06 C0 0E E0 1E F0 1C 78 1F F8 3F F8 3F F8"
- $"7F F8 FF FF E0 FF 80 3E 00 FC 00 D0",
- {9, 6}
- };
-
- resource 'CURS' (rACursor4, preload, nonPurgeable) {
- $"0E 06 05 0A 04 CA 02 32 03 04 03 B8 03 A0 03 A0"
- $"36 20 36 20 18 10 31 E8 1A E4 12 12 0E 0A 06 06",
- $"0E 06 07 0E 07 CE 03 FE 03 FC 03 F8 03 E0 03 E0"
- $"37 E0 37 E0 1F F0 3F F8 1E FC 1E 1E 0E 0E 06 06",
- {6, 6}
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is the cursor used when the cursor is over a sound document window. */
-
- resource 'CURS' (rSndCursor, preload, nonPurgeable) {
- $"03 80 04 C0 04 C0 04 C0 04 C0 04 C0 74 F8 9C AE"
- $"4C AB 24 0B 24 03 10 03 08 03 08 06 04 06 04 06",
- $"03 80 07 C0 07 C0 07 C0 07 C0 07 C0 77 F8 FF FE"
- $"7F FF 3F FF 3F FF 1F FF 0F FF 0F FE 07 FE 07 FE",
- {0, 7}
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to create the bungle package used by the Finder.
- I use type coerson to create my signature string. Many of these resources
- have to do with the new Finder for System 7.0 and the desktop display, such
- as the use of color icons. */
-
- type rAppSignature as 'STR ';
-
- resource rAppSignature (0, "Owner resource", purgeable) {
- "SoundApp"
- };
-
- resource 'BNDL' (rAppBundle, purgeable) {
- rAppSignature, 0,
- {
- 'ICN#', {0, rMoofIcon, 1, rSndDocIcon},
- 'FREF', {0, rMoofIcon, 1, rSndDocIcon},
- }
- };
-
- resource 'FREF' (rAppBundle, purgeable) {
- 'APPL', 0, ""
- };
-
- resource 'FREF' (rSndDocIcon, purgeable) {
- rSndAppDocType, 1, ""
- };
-
- resource 'ICN#' (rMoofIcon, purgeable) {
- {
- /* [1] */
- $"0430 4000 0A50 A000 0B91 1002 0822 0803"
- $"1224 0405 2028 0209 4010 0111 800C 00A1"
- $"8003 FFC2 7E00 FF04 0100 7F04 0300 1E08"
- $"04E0 000C 08E0 000A 10E0 0009 08C0 0006"
- $"0487 FE04 0288 0104 0188 0084 0088 0044"
- $"0088 0044 0088 00C4 0110 0188 0228 0310"
- $"01C4 04E0 0002 0800 73BF FBEE 4CA2 8A2A"
- $"40AA AAEA 52AA AA24 5EA2 8AEA 73BE FB8E",
- /* [2] */
- $"0430 4000 0E70 E000 0FF1 F002 0FE3 F803"
- $"1FE7 FC07 3FEF FE0F 7FFF FF1F FFFF FFBF"
- $"FFFF FFFE 7FFF FFFC 01FF FFFC 03FF FFF8"
- $"07FF FFFC 0FFF FFFE 1FFF FFFF 0FFF FFFE"
- $"07FF FFFC 03FF FFFC 01FF FFFC 00FF FFFC"
- $"00FF FFFC 00FF FFFC 01FF FFF8 03EF FFF0"
- $"01C7 FCE0 0003 F800 73BF FBEE 7FBE FBEE"
- $"7FBE FBEE 7FBE FBE4 7FBE FBEE 73BE FB8E"
- }
- };
-
- resource 'ICN#' (rSndDocIcon, purgeable) {
- {
- /* [1] */
- $"0000 0000 0000 0000 7FFF FFC0 4000 0060"
- $"4000 0050 4E97 0048 48D4 807C 4EB4 8004"
- $"4294 8004 4E97 0004 4000 0004 4000 0004"
- $"4001 8204 4003 8104 4006 8884 400C 8444"
- $"4018 8244 4030 9244 4FE0 9224 4800 8924"
- $"4800 8924 4800 8924 4FE0 8924 4FF0 9224"
- $"4038 9244 401C 8244 400E 8444 4007 8884"
- $"4003 8104 4001 8204 4000 0004 7FFF FFFC",
- /* [2] */
- $"0000 0000 0000 0000 7FFF FFC0 7FFF FFE0"
- $"7FFF FFF0 7FFF FFF8 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- $"7FFF FFFC 7FFF FFFC 7FFF FFFC 7FFF FFFC"
- }
- };
-
- resource 'icl4' (rMoofIcon, purgeable) {
- $"0000 0F00 00FF 0000 0F00 0000 0000 0000"
- $"0000 F0F0 0F0F 0000 F8F0 0000 0000 0000"
- $"0000 F0FF F00F 000F 888F 0000 0000 00F0"
- $"0000 F000 00F0 00F8 8888 F000 0000 00FF"
- $"000F 00F0 00F0 0F88 8888 8F00 0000 0F0F"
- $"00F0 0000 00F0 F888 8888 88F0 0000 F00F"
- $"0F00 0000 000F 8888 8888 888F 000F 000F"
- $"F000 0000 0000 FF88 8888 8888 F0F0 000F"
- $"F000 0000 0000 00FF FFFF FFFF FF00 00F0"
- $"0FFF FFF0 0000 0000 FFFF FFFF 0000 0F00"
- $"0000 000F 0000 0000 0FFF FFFF 0000 0F00"
- $"0000 00FF 0000 0000 000F FFF0 0000 F000"
- $"0000 0F88 FFF0 0000 0000 0000 0000 FF00"
- $"0000 F888 FFF0 0000 0000 0000 0000 F8F0"
- $"000F 8888 FFF0 0000 0000 0000 0000 F88F"
- $"0000 F888 FF00 0000 0000 0000 0000 0FF0"
- $"0000 0F88 F000 0FFF FFFF FFF0 0000 0F00"
- $"0000 00F8 F000 F888 8888 888F 0000 0F00"
- $"0000 000F F000 F888 8888 8888 F000 0F00"
- $"0000 0000 F000 F888 8888 8888 8F00 0F00"
- $"0000 0000 F000 F888 8888 8888 8F00 0F00"
- $"0000 0000 F000 F888 8888 8888 FF00 0F00"
- $"0000 000F 000F 8888 8888 888F F000 F000"
- $"0000 00F0 00F0 F888 8888 88FF 000F 0000"
- $"0000 000F FF00 0F88 8888 8F00 FFF0 0000"
- $"0000 0000 0000 00F8 8888 F000 0000 0000"
- $"0FFF 00FF F0FF FFFF FFFF F0FF FFF0 FFF0"
- $"0F33 FF33 F0F3 33F0 F333 F0F3 33F0 F3F0"
- $"0F33 3333 F0F3 F3F0 F3F3 F0F3 FFF0 F3F0"
- $"0F3F 33F3 F0F3 F3F0 F3F3 F0F3 33F0 0F00"
- $"0F3F FFF3 F0F3 33F0 F333 F0F3 FFF0 F3F0"
- $"0FFF 00FF F0FF FFF0 FFFF F0FF F000 FFF0"
- };
-
- resource 'icl4' (rSndDocIcon, purgeable) {
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0000 0000 0000 0000 0000 0000 0000 0000"
- $"0FFF FFFF FFFF FFFF FFFF FFFF FF00 0000"
- $"0F00 0000 0000 0000 0000 0000 0FD0 0000"
- $"0F00 0000 0000 0000 0000 0000 0FDD 0000"
- $"0F00 FFF0 F00F 0FFF 0000 0000 0FDD D000"
- $"0F00 F000 FF0F 0F00 F000 0000 0FFF FF00"
- $"0F00 FFF0 F0FF 0F00 F000 0000 0000 0F00"
- $"0F00 00F0 F00F 0F00 F000 0000 0000 0F00"
- $"0F00 FFF0 F00F 0FFF 0000 0000 0000 0F00"
- $"0F00 0000 0000 0000 0000 0000 0000 0F00"
- $"0F00 0000 0000 0000 D000 0000 0000 0F00"
- $"0F00 0000 0000 000F E000 00F0 0000 0F00"
- $"0F00 0000 0000 00FE E000 000F 0000 0F00"
- $"0F00 0000 0000 0FED C000 F000 F000 0F00"
- $"0F00 0000 0000 FEDC C000 0F00 0F00 0F00"
- $"0F00 0000 000F EDC0 C000 00F0 0F00 0F00"
- $"0F00 0000 00FE DC00 D00F 00F0 0F00 0F00"
- $"0F00 EFFF FFED C0CC D00F 00F0 00F0 0F00"
- $"0F00 EDDD DDCC CCCC E000 F00F 00F0 0F00"
- $"0F00 D000 00C0 CCCC E000 F00F 00F0 0F00"
- $"0F00 ECCC CCDC CCCC E000 F00F 00F0 0F00"
- $"0F00 FEEE EEEE DDDD E000 F00F 00F0 0F00"
- $"0F00 FFFF FFEE EDDD F00F 00F0 00F0 0F00"
- $"0F00 0000 00FE EEDD E00F 00F0 0F00 0F00"
- $"0F00 0000 000F FEED F000 00F0 0F00 0F00"
- $"0F00 0000 0000 FEEE E000 0F00 0F00 0F00"
- $"0F00 0000 0000 0FFE F000 F000 F000 0F00"
- $"0F00 0000 0000 00FE F000 000F 0000 0F00"
- $"0F00 0000 0000 000F F000 00F0 0000 0F00"
- $"0F00 0000 0000 0000 D000 0000 0000 0F00"
- $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF FF"
- };
-
- resource 'ics4' (rMoofIcon, purgeable) {
- $"00F0 0F00 FF00 0000 00F0 FF0F 88F0 000F"
- $"0F0F 0FF8 888F 00FF F000 0FF8 8888 FF0F"
- $"FFFF 000F FFFF F0FF 000F 0000 FFFF 00F0"
- $"00F8 FF00 0000 00F0 0F88 FF00 0000 00FF"
- $"00F8 F0FF FFFF 00F0 000F F0F8 8888 F0F0"
- $"0000 F0F8 8888 F0F0 000F 0FF8 888F F0F0"
- $"000F F00F 88F0 FF00 0000 0000 FF"
- };
-
- resource 'ics4' (rSndDocIcon, purgeable) {
- $"0000 0000 0000 0000 FFFF FFFF FFFF FF00"
- $"F000 0000 0000 0FF0 F000 0000 0000 0FFF"
- $"F000 0000 F000 000F F000 000F E00F 000F"
- $"F000 00FE E000 F00F F000 0FED D0F0 0F0F"
- $"F0FF FED0 D00F 0F0F F0FC CCCC D00F 0F0F"
- $"F0FE EDDD D00F 0F0F F0FF FEDD E0F0 0F0F"
- $"F000 0FEE E000 F00F F000 00FE E00F 000F"
- $"F000 000F F000 000F FFFF FFFF FFFF FFFF"
- };
-
- resource 'ics#' (rMoofIcon, purgeable) {
- {
- /* [1] */
- $"24C0 2D21 5613 860D F1FB 10F2 2C02 4C03"
- $"2BF2 1A0A 0A0A 161A 192C 00C0",
- /* [2] */
- $"24C0 2DE1 7FF3 FFFF FFFF 1FFE 3FFE 7FFF"
- $"3FFE 1FFE 0FFE 1FFE 19EC 00C0"
- }
- };
-
- resource 'ics#' (rSndDocIcon, purgeable) {
- {
- /* [1] */
- $"0000 FFFC 8006 8007 8081 8191 8289 84A5"
- $"B895 A095 B895 BCA5 8689 8391 8181 FFFF",
- /* [2] */
- $"0000 FFFC FFFE FFFF FFFF FFFF FFFF FFFF"
- $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF"
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for an emergency exit alert. */
-
- resource 'ALRT' (rExitAlert, "Exit alert", purgeable) {
- {0, 0, kExitAlertSizeH, kExitAlertSizeW}, rExitAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- },
- alertPositionMainScreen
- };
-
- resource 'DITL' (rExitAlert, "Exit alert", purgeable) {
- {
- /* [1] */ { kExitAlertSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kExitAlertSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kExitAlertSizeH - kStandardWhiteSpacing, /* bottom */
- kExitAlertSizeW - kStandardWhiteSpacing /* right */
- }, Button {enabled, "OK"},
- /* [2] */ kStdAlertIconRect, Icon {disabled, rCautionIcon},
- /* [3] */ { kStandardWhiteSpacing,
- kStdAlertIconLeft + kIconWidthOrHeight + kStandardWhiteSpacing,
- kStandardWhiteSpacing + kIconWidthOrHeight,
- kExitAlertSizeW - kStandardWhiteSpacing
- }, StaticText {disabled, "Sorry, an unrecoverable error has occurred!"},
- /* [4] */ { kStandardWhiteSpacing + kIconWidthOrHeight + kStandardWhiteSpacing,
- kStandardWhiteSpacing,
- kExitAlertSizeH - (kButtonSizeH + (2 * kStandardWhiteSpacing)),
- kExitAlertSizeW - kStandardWhiteSpacing
- }, StaticText {disabled, "^0"}
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to display error messages to the user. */
-
- resource 'ALRT' (rUserAlert, "Error alert", purgeable) {
- {0, 0, kUserAlertSizeH, kUserAlertSizeW}, rUserAlert,
- {
- /* [1] */ OK, visible, silent,
- /* [2] */ OK, visible, silent,
- /* [3] */ OK, visible, silent,
- /* [4] */ OK, visible, silent
- },
- alertPositionMainScreen
- };
-
- resource 'DITL' (rUserAlert, "Error alert", purgeable) {
- {
- /* [1] */ { kUserAlertSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kUserAlertSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kUserAlertSizeH - kStandardWhiteSpacing, /* bottom */
- kUserAlertSizeW - kStandardWhiteSpacing /* right */
- }, Button {enabled, "OK"},
- /* [2] */ { kStandardWhiteSpacing,
- kStdAlertIconLeft + kIconWidthOrHeight + kStandardWhiteSpacing,
- kUserAlertSizeH - kStandardWhiteSpacing - kStandardWhiteSpacing - kButtonSizeH,
- kUserAlertSizeW - kStandardWhiteSpacing
- }, StaticText {disabled, "^0\n(error = ^1)"},
- /* [3] */ kStdAlertIconRect, Icon {disabled, rCautionIcon}
- }
- };
-
- /* These are the strings used for error messages. */
- resource 'STR#' (sErrStrings, "Error alert", purgeable) {
- {
- "An error has occurred.";
- "A Memory Manager error has occurred.";
- "A Resource Manager error has occurred.";
- "That file is currently open and cannot be used.";
- "The wave table synthesizer is not available.";
- "This system does not support the Sound Manager; use System 7.0 or later.";
- "Memory is too low to continue. Try closing a window or increasing the SIZE resource.";
- "Could not find application’s menu resources.";
- "Could not initialize the Sound unit.";
- "The Sound Manager has encountered an error.";
- "Could not create a new document.";
- "Error initializing the status window.";
- "Could not complete the edit command.";
- "There is a problem with this document.";
- }
- };
-
- /* These are a set of strings used to report Sound Manager errors. Instead of
- the error number, one of these strings will be used. These are only the set
- of Sound Manager errors. The equation to be used to include additional strings
- is the Sound Manager ABS(error) + noHardware) + 1. 200 is the first Sound Manager
- error number and 1 is the index, since GetIndString is 1 based. */
-
- resource 'STR#' (sSMErrStrings, "Error alert", purgeable) {
- {
- "no hardware available"; /* noHardware -200 */
- "not enough hardware available"; /* notEnoughHardware -201 */
- ""; /* not used -202 */
- "sound channel queue is full"; /* queueFull -203 */
- "problem with resource"; /* resProblem -204 */
- "bad sound channel"; /* badChannel -205 */
- "bad sound format"; /* badFormat -206 */
- "could not allocate enough memory"; /* notEnoughBufferSpace -207 */
- "was not type AIFF or was of bad format"; /* badFileFormat -208 */
- "the Channel is being used"; /* channelBusy -209 */
- "can not operate in the memory allowed"; /* buffersTooSmall -210 */
- "the channel is not busy"; /* channelNotBusy -211 */
- "not enought CPU cycles left"; /* noMoreRealTime -212 */
- ""; /* not used -213 */
- ""; /* not used -214 */
- ""; /* not used -215 */
- ""; /* not used -216 */
- ""; /* not used -217 */
- ""; /* not used -218 */
- ""; /* not used -219 */
- "sound input hardware not available"; /* siNoSoundInHardware -220 */
- "invalid index"; /* siBadSoundInDevice -221 */
- "nil buffer passed"; /* siNoBufferSpecified -222 */
- "invalid compression type"; /* siInvalidCompression -223 */
- "hard drive too slow to record to disk"; /* siHardDriveTooSlow -224 */
- "invalid sample rate"; /* siInvalidSampleRate -225 */
- "invalid sample size"; /* siInvalidSampleSize -226 */
- "input device already in use"; /* siDeviceBusyErr -227 */
- "input device could not be opened"; /* siBadDeviceName -228 */
- "invalid input device reference number"; /* siBadRefNum -229 */
- "input device hardware failure"; /* siInputDeviceErr -230 */
- "invalid info type selector"; /* siUnknownInfoType -231 */
- "invalid quality selector"; /* siUnknownQuality -232 */
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used to tell the user about the sound volume. */
-
- resource 'ALRT' (rSoundVol, "Volume alert", purgeable) {
- {0, 0, kSoundVolSizeH, kSoundVolSizeW}, rSoundVol,
- {
- /* [1] */ OK, visible, sound1,
- /* [2] */ OK, visible, sound1,
- /* [3] */ OK, visible, sound1,
- /* [4] */ OK, visible, sound1
- },
- alertPositionMainScreen
- };
-
- resource 'DITL' (rSoundVol, "Volume alert", purgeable) {
- {
- /* [1] */ { kSoundVolSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kSoundVolSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kSoundVolSizeH - kStandardWhiteSpacing, /* bottom */
- kSoundVolSizeW - kStandardWhiteSpacing /* right */
- }, Button {enabled, "OK"},
- /* [2] */ { kStandardWhiteSpacing,
- kStdAlertIconLeft + kIconWidthOrHeight + kStandardWhiteSpacing,
- kSoundVolSizeH - kStandardWhiteSpacing - kStandardWhiteSpacing - kButtonSizeH,
- kSoundVolSizeW - kStandardWhiteSpacing
- }, StaticText {disabled,
- "The sound volume is ^0%. Use the Control Panel if you wish to adjust this."},
- /* [3] */ kStdAlertIconRect, Icon {disabled, rNoteIcon}
- }
- };
-
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources for my name this sound dialog. */
-
- resource 'DLOG' (rGetNameDLOG, "Name sound", purgeable) {
- {0, 0, kGetNameDialogSizeH, kGetNameDialogSizeW},
- dBoxProc, visible, noGoAway, 0, rGetNameDLOG, "", alertPositionMainScreen
- };
-
- resource 'DITL' (rGetNameDLOG, "Name sound", purgeable) {
- {
- /* [1] */ { kGetNameDialogSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kGetNameDialogSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kGetNameDialogSizeH - kStandardWhiteSpacing, /* bottom */
- kGetNameDialogSizeW - kStandardWhiteSpacing /* right */
- }, Button {enabled, "OK"},
- /* [2] */ { kGetNameDialogSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kGetNameDialogSizeW - (2 * (kStandardWhiteSpacing + kButtonSizeW)), /* left */
- kGetNameDialogSizeH - kStandardWhiteSpacing, /* bottom */
- kGetNameDialogSizeW - (kButtonSizeW + (2 * kStandardWhiteSpacing)) /* right */
- }, Button {enabled, "Cancel"},
- /* [3] */ { kStandardWhiteSpacing + kStandardTextHeight + kStandardWhiteSpacing,
- kStandardWhiteSpacing,
- kStandardWhiteSpacing + kStandardTextHeight + kStandardWhiteSpacing + kStandardTextHeight,
- kGetNameDialogSizeW - kStandardWhiteSpacing
- }, EditText {enabled, ""},
- /* [4] */ { kStandardWhiteSpacing,
- kStandardWhiteSpacing,
- kStandardWhiteSpacing + 16,
- kGetNameDialogSizeW - kStandardWhiteSpacing
- }, StaticText {disabled, "Please name this sound..."},
- /* [5] */ {0, 0, 0, 0}, UserItem {disabled},
- }
- };
-
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources for my custom Standard File dialog. */
-
- resource 'DLOG' (rCustomGetFileDLOG, "Get file", purgeable) {
- {0, 0, 198, 344},
- dBoxProc, invisible, noGoAway, 0, rCustomGetFileDLOG, "", alertPositionMainScreen
- };
-
- resource 'DITL' (rCustomGetFileDLOG, "Get file", purgeable) {
- {
- /* [1] */ {135, 252, 155, 332}, Button {enabled, "Open"},
- /* [2] */ {104, 252, 124, 332}, Button {enabled, "Cancel"},
- /* [3] */ {0, 0, 0, 0}, HelpItem {disabled, HMScanhdlg {-6042}},
- /* [4] */ {8, 235, 24, 337}, UserItem {enabled},
- /* [5] */ {32, 252, 52, 332}, Button {enabled, "Eject"},
- /* [6] */ {60, 252, 80, 332}, Button {enabled, "Desktop"},
- /* [7] */ {29, 12, 159, 230}, UserItem {enabled},
- /* [8] */ {6, 12, 25, 230}, UserItem {enabled},
- /* [9] */ {91, 251, 92, 333}, Picture {disabled, 11},
- /* [10] */ {169, 13, 185, 285}, CheckBox {enabled, "Show only files with sound resources"}
- }
- };
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- We use an MBAR resource to conveniently load all the menus */
-
- resource 'MBAR' (rMenuBar, preload) {
- {mApple, mFile, mEdit, mDemos};
- };
-
- resource 'MENU' (mApple, preload) { /* Disable dashed line, enable About and DAs */
- mApple, textMenuProc, (AllItems & ~MenuItem2), enabled, apple,
- {
- "About SoundApp…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain
- }
- };
-
- resource 'MENU' (mFile, preload) { /* enable Quit and Open only, program enables others */
- mFile, textMenuProc, (NoItems | MenuItem1 | MenuItem2 | MenuItem12), enabled, "File",
- {
- "New", noicon, "N", nomark, plain;
- "Open…", noicon, "O", nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Close", noicon, "W", nomark, plain;
- "Save", noicon, "S", nomark, plain;
- "Save As…", noicon, nokey, nomark, plain;
- "Revert", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Page Setup…", noicon, nokey, nomark, plain;
- "Print…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Quit", noicon, "Q", nomark, plain
- }
- };
-
- resource 'MENU' (mEdit, preload) { /* disable everything, program does the enabling */
- mEdit, textMenuProc, NoItems, enabled, "Edit",
- {
- "Undo", noicon, "Z", nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Cut", noicon, "X", nomark, plain;
- "Copy", noicon, "C", nomark, plain;
- "Paste", noicon, "V", nomark, plain;
- "Clear", noicon, "B", nomark, plain
- }
- };
-
- resource 'MENU' (mDemos, preload) { /* enable everything except the dashed lines */
- mDemos, textMenuProc, (AllItems), enabled, "Demos",
- {
- "Check Volume...", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Square Wave Scale", noicon, nokey, nomark, plain;
- "Square Wave Melody", noicon, nokey, nomark, plain;
- "Square Wave Timbres", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Wave Table Scale", noicon, nokey, nomark, plain;
- "Wave Table Melody", noicon, nokey, nomark, plain;
- "Wave Table Counterpoint", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Sample Sound Melody", noicon, nokey, nomark, plain;
- "Sample Sound Counterpoint", noicon, nokey, nomark, plain;
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- The quintessential MultiFinder friendliness device, the SIZE resource */
-
- resource 'SIZE' (-1, purgeable) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground, /* we can background, but we don’t */
- multiFinderAware, /* we do our own activate/deactivate */
- backgroundAndForeground, /* this is not a background-only application! */
- dontGetFrontClicks, /* standard, don’t want front clicks */
- ignoreChildDiedEvents, /* I’m not a debugger and I don’t sub-launch */
- is32BitCompatible, /* this is a 32 bit clean application */
- isHighLevelEventAware, /* I use AppleEvents */
- onlyLocalHLEvents,
- notStationeryAware,
- dontUseTextEditServices,
- reserved, reserved, reserved,
- kPrefSize * 1024,
- kMinSize * 1024
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- This is the prompt string that appears in the SFPutFile dialog. */\
-
- resource 'STR ' (rPutFileMsg, "Put file", purgeable) {
- "Create a new file named…"
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the application’s about window.
- The ICON is copied from the bundle resource’s ICN#. The cicn is also
- based on that.
-
- VERSION 1.2: Removed the 'cicn' resource, and uses PlotIconID. */
-
- resource 'WIND' (rAboutWindow, "About dialog", purgeable) {
- {0, 0, kAboutWindowSizeH, kAboutWindowSizeW},
- altDBoxProc, visible, noGoAway, 0, "", alertPositionMainScreen
- };
-
- resource 'CNTL' (rAboutOKCntl, "About dialog", purgeable) {
- {
- kAboutWindowSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kAboutWindowSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kAboutWindowSizeH - kStandardWhiteSpacing, /* bottom */
- kAboutWindowSizeW - kStandardWhiteSpacing /* right */
- }, 0, visible, 0, 0, pushButProc, 0, "OK"
- };
-
- resource 'STR ' (rAboutText, "About dialog", purgeable) {
- "“^0” version ^1\n"
- "A sample application using the Sound Manager.\n\n"
- "Brought to you by Jim Reekes\n"
- "Copyright © 1989-94 Apple Computer\n\n"
- "We’d go Moof!™ for you, but Vince won’t let us."
- };
-
- resource 'PICT' (rAppPict, "About dialog", purgeable) {
- 3396, {110, 108, 151, 350},
- $"0011 02FF 0C00 FFFF FFFF 006C 0000 006E 0000 015E 0000 0097 0000 0000 0000 001E"
- $"0001 000A 006E 006C 0097 015E 0099 80FA 006E 006C 0097 0165 0000 0000 0000 0000"
- $"0048 0000 0048 0000 0000 0008 0001 0008 0000 0000 0000 1F10 0000 0000 0000 0791"
- $"8000 00FF 0800 FFFF FFFF FFFF 0800 FFFF FFFF CCCC 0800 FFFF FFFF 9999 0800 FFFF"
- $"FFFF 6666 0800 FFFF FFFF 3333 0800 FFFF FFFF 0000 0800 FFFF CCCC FFFF 0800 FFFF"
- $"CCCC CCCC 0800 FFFF CCCC 9999 0800 FFFF CCCC 6666 0800 FFFF CCCC 3333 0800 FFFF"
- $"CCCC 0000 0800 FFFF 9999 FFFF 0800 FFFF 9999 CCCC 0800 FFFF 9999 9999 0800 FFFF"
- $"9999 6666 0800 FFFF 9999 3333 0800 FFFF 9999 0000 0800 FFFF 6666 FFFF 0800 FFFF"
- $"6666 CCCC 0800 FFFF 6666 9999 0800 FFFF 6666 6666 0800 FFFF 6666 3333 0800 FFFF"
- $"6666 0000 0800 FFFF 3333 FFFF 0800 FFFF 3333 CCCC 0800 FFFF 3333 9999 0800 FFFF"
- $"3333 6666 0800 FFFF 3333 3333 0800 FFFF 3333 0000 0800 FFFF 0000 FFFF 0800 FFFF"
- $"0000 CCCC 0800 FFFF 0000 9999 0800 FFFF 0000 6666 0800 FFFF 0000 3333 0800 FFFF"
- $"0000 0000 0800 CCCC FFFF FFFF 0800 CCCC FFFF CCCC 0800 CCCC FFFF 9999 0800 CCCC"
- $"FFFF 6666 0800 CCCC FFFF 3333 0800 CCCC FFFF 0000 0800 CCCC CCCC FFFF 0800 CCCC"
- $"CCCC CCCC 0800 CCCC CCCC 9999 0800 CCCC CCCC 6666 0800 CCCC CCCC 3333 0800 CCCC"
- $"CCCC 0000 0800 CCCC 9999 FFFF 0800 CCCC 9999 CCCC 0800 CCCC 9999 9999 0800 CCCC"
- $"9999 6666 0800 CCCC 9999 3333 0800 CCCC 9999 0000 0800 CCCC 6666 FFFF 0800 CCCC"
- $"6666 CCCC 0800 CCCC 6666 9999 0800 CCCC 6666 6666 0800 CCCC 6666 3333 0800 CCCC"
- $"6666 0000 0800 CCCC 3333 FFFF 0800 CCCC 3333 CCCC 0800 CCCC 3333 9999 0800 CCCC"
- $"3333 6666 0800 CCCC 3333 3333 0800 CCCC 3333 0000 0800 CCCC 0000 FFFF 0800 CCCC"
- $"0000 CCCC 0800 CCCC 0000 9999 0800 CCCC 0000 6666 0800 CCCC 0000 3333 0800 CCCC"
- $"0000 0000 0800 9999 FFFF FFFF 0800 9999 FFFF CCCC 0800 9999 FFFF 9999 0800 9999"
- $"FFFF 6666 0800 9999 FFFF 3333 0800 9999 FFFF 0000 0800 9999 CCCC FFFF 0800 9999"
- $"CCCC CCCC 0800 9999 CCCC 9999 0800 9999 CCCC 6666 0800 9999 CCCC 3333 0800 9999"
- $"CCCC 0000 0800 9999 9999 FFFF 0800 9999 9999 CCCC 0800 9999 9999 9999 0800 9999"
- $"9999 6666 0800 9999 9999 3333 0800 9999 9999 0000 0800 9999 6666 FFFF 0800 9999"
- $"6666 CCCC 0800 9999 6666 9999 0800 9999 6666 6666 0800 9999 6666 3333 0800 9999"
- $"6666 0000 0800 9999 3333 FFFF 0800 9999 3333 CCCC 0800 9999 3333 9999 0800 9999"
- $"3333 6666 0800 9999 3333 3333 0800 9999 3333 0000 0800 9999 0000 FFFF 0800 9999"
- $"0000 CCCC 0800 9999 0000 9999 0800 9999 0000 6666 0800 9999 0000 3333 0800 9999"
- $"0000 0000 0800 6666 FFFF FFFF 0800 6666 FFFF CCCC 0800 6666 FFFF 9999 0800 6666"
- $"FFFF 6666 0800 6666 FFFF 3333 0800 6666 FFFF 0000 0800 6666 CCCC FFFF 0800 6666"
- $"CCCC CCCC 0800 6666 CCCC 9999 0800 6666 CCCC 6666 0800 6666 CCCC 3333 0800 6666"
- $"CCCC 0000 0800 6666 9999 FFFF 0800 6666 9999 CCCC 0800 6666 9999 9999 0800 6666"
- $"9999 6666 0800 6666 9999 3333 0800 6666 9999 0000 0800 6666 6666 FFFF 0800 6666"
- $"6666 CCCC 0800 6666 6666 9999 0800 6666 6666 6666 0800 6666 6666 3333 0800 6666"
- $"6666 0000 0800 6666 3333 FFFF 0800 6666 3333 CCCC 0800 6666 3333 9999 0800 6666"
- $"3333 6666 0800 6666 3333 3333 0800 6666 3333 0000 0800 6666 0000 FFFF 0800 6666"
- $"0000 CCCC 0800 6666 0000 9999 0800 6666 0000 6666 0800 6666 0000 3333 0800 6666"
- $"0000 0000 0800 3333 FFFF FFFF 0800 3333 FFFF CCCC 0800 3333 FFFF 9999 0800 3333"
- $"FFFF 6666 0800 3333 FFFF 3333 0800 3333 FFFF 0000 0800 3333 CCCC FFFF 0800 3333"
- $"CCCC CCCC 0800 3333 CCCC 9999 0800 3333 CCCC 6666 0800 3333 CCCC 3333 0800 3333"
- $"CCCC 0000 0800 3333 9999 FFFF 0800 3333 9999 CCCC 0800 3333 9999 9999 0800 3333"
- $"9999 6666 0800 3333 9999 3333 0800 3333 9999 0000 0800 3333 6666 FFFF 0800 3333"
- $"6666 CCCC 0800 3333 6666 9999 0800 3333 6666 6666 0800 3333 6666 3333 0800 3333"
- $"6666 0000 0800 3333 3333 FFFF 0800 3333 3333 CCCC 0800 3333 3333 9999 0800 3333"
- $"3333 6666 0800 3333 3333 3333 0800 3333 3333 0000 0800 3333 0000 FFFF 0800 3333"
- $"0000 CCCC 0800 3333 0000 9999 0800 3333 0000 6666 0800 3333 0000 3333 0800 3333"
- $"0000 0000 0800 0000 FFFF FFFF 0800 0000 FFFF CCCC 0800 0000 FFFF 9999 0800 0000"
- $"FFFF 6666 0800 0000 FFFF 3333 0800 0000 FFFF 0000 0800 0000 CCCC FFFF 0800 0000"
- $"CCCC CCCC 0800 0000 CCCC 9999 0800 0000 CCCC 6666 0800 0000 CCCC 3333 0800 0000"
- $"CCCC 0000 0800 0000 9999 FFFF 0800 0000 9999 CCCC 0800 0000 9999 9999 0800 0000"
- $"9999 6666 0800 0000 9999 3333 0800 0000 9999 0000 0800 0000 6666 FFFF 0800 0000"
- $"6666 CCCC 0800 0000 6666 9999 0800 0000 6666 6666 0800 0000 6666 3333 0800 0000"
- $"6666 0000 0800 0000 3333 FFFF 0800 0000 3333 CCCC 0800 0000 3333 9999 0800 0000"
- $"3333 6666 0800 0000 3333 3333 0800 0000 3333 0000 0800 0000 0000 FFFF 0800 0000"
- $"0000 CCCC 0800 0000 0000 9999 0800 0000 0000 6666 0800 0000 0000 3333 0800 EEEE"
- $"0000 0000 0800 DDDD 0000 0000 0800 BBBB 0000 0000 0800 AAAA 0000 0000 0800 8888"
- $"0000 0000 0800 7777 0000 0000 0800 5555 0000 0000 0800 4444 0000 0000 0800 2222"
- $"0000 0000 0800 1111 0000 0000 0800 0000 EEEE 0000 0800 0000 DDDD 0000 0800 0000"
- $"BBBB 0000 0800 0000 AAAA 0000 0800 0000 8888 0000 2000 AAAA AAAA AAAA 2000 DDDD"
- $"DDDD DDDD 2000 0000 0000 1111 2000 0000 0000 4444 2000 0000 0000 7777 2000 0000"
- $"0000 AAAA 2000 0000 0000 DDDD 2000 0000 1111 0000 2000 0000 4444 0000 2000 0003"
- $"D0D7 0001 2000 1111 1111 1111 2000 2222 2222 2222 2000 4444 4444 4444 2000 5555"
- $"5555 5555 2000 7777 7777 7777 2000 8888 8888 8888 2000 BBBB BBBB BBBB 2000 EEEE"
- $"EEEE EEEE 2000 0000 0000 2222 2000 0000 0000 5555 2000 0000 0000 8888 2000 0000"
- $"0000 BBBB 2000 0000 0000 EEEE 2000 0000 2222 0000 2000 0000 5555 0000 0800 0000"
- $"0000 0000 006E 006C 0097 015E 006E 006C 0097 015E 0000 000A 006E 006C 0097 015E"
- $"0481 0087 0004 8100 8700 0481 0087 0004 8100 8700 08F9 0081 FF9E FFF2 000C F900"
- $"00FF 81EF A0EF 00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 000C F900 00FF 81EF A0EF"
- $"00FF F200 0FF9 0000 FF8B EF01 0000 98EF 00FF F200 17F9 0000 FFD5 EF01 0000 BBEF"
- $"FD00 F1EF FE00 ABEF 00FF F200 16F9 0000 FFDD EFF8 00B9 EFFD 00F1 EFFE 00AC EF00"
- $"FFF2 001A F900 00FF DEEF FD00 FEEF FE00 B9EF FD00 F1EF FD00 ADEF 00FF F200 1BF9"
- $"0000 FFE0 EFFC 00FD EF01 0000 B8EF FD00 F1EF FC00 AEEF 00FF F200 36F9 0000 FFE1"
- $"EFFC 00FD EFFE 00F7 EFFB 00F7 EFFD 00FE EFFC 00F7 EF02 0000 EFFC 00F5 EFF8 00F1"
- $"EFFB 00F4 EFF9 00F5 EFF9 00D8 EF00 FFF2 0037 F900 00FF E3EF FB00 F2EF F700 F9EF"
- $"FD00 FDEF FD00 F8EF F700 F7EF FD00 01EF EFFC 00F1 EFFB 00F5 EFF5 00F8 EFFD 0000"
- $"EFFB 00DB EF00 FFF2 0047 F900 00FF E3EF FC00 F3EF FD00 FEEF FD00 F9EF FC00 FEEF"
- $"FC00 F9EF FC00 01EF EFFC 00F9 EFFC 00FE EFFC 00F2 EF02 0000 EFFD 00F6 EFFD 00FD"
- $"EFFD 00F9 EFFC 00FE EFFC 00DC EF00 FFF2 0047 F900 00FF E3EF FA00 F6EF FD00 FDEF"
- $"FD00 F9EF FD00 FDEF FD00 F8EF FD00 FDEF FD00 F9EF FD00 FDEF FC00 F2EF 0300 00EF"
- $"EFFD 00F7 EFFC 00FD EFFC 00FA EFFC 00FE EFFB 00DE EF00 FFF2 0047 F900 00FF E2EF"
- $"FA00 F8EF FD00 FDEF FC00 FAEF FC00 FEEF FC00 F8EF FD00 FDEF FD00 F9EF FD00 FCEF"
- $"FD00 F2EF 0100 00FE EFFD 00F6 EFFD 00FC EFFC 00FB EFFC 00FC EFFC 00E0 EF00 FFF2"
- $"0046 F900 00FF E2EF FA00 F9EF FD00 FDEF FC00 FAEF FC00 FDEF FD00 F8EF FC00 FEEF"
- $"FC00 F9EF FD00 FCEF FD00 F2EF FE00 FEEF FD00 F7EF FC00 FCEF FD00 FAEF FC00 FCEF"
- $"FC00 E1EF 00FF F200 42F9 0000 FFE1 EFFC 00F9 EFFD 00FC EFFC 00FA EFFC 00FE EFFC"
- $"00F8 EFFD 00FD EFFC 00F9 EFFD 00FC EFFD 00F2 EFF6 00F7 EFFD 00FC EFFC 00FA EFFC"
- $"00FC EFFC 00E2 EF00 FFF2 004B F900 00FF E9EF 0100 00FB EFFC 00FA EFFD 00FC EFFC"
- $"00FA EFFC 00FD EFFC 00F8 EFFD 00FD EFFC 00F9 EFFD 00FC EFFC 00F3 EFFE 00FC EFFD"
- $"00F8 EFFC 00FC EFFC 00FA EFFC 00FC EFFC 00E3 EF00 FFF2 004B F900 00FF EAEF 0100"
- $"00FB EFFC 00FA EFFC 00FD EFFC 00F9 EFFC 00FD EFFD 00F7 EFFD 00FD EFFC 00F9 EFFC"
- $"00FD EFFC 00F3 EFFE 00FB EFFD 00F8 EFFC 00FC EFFD 00F9 EFFB 00FD EFFC 00E4 EF00"
- $"FFF2 004B F900 00FF ECEF FD00 FCEF FD00 F8EF FD00 FDEF FD00 F8EF FB00 01EF EFFB"
- $"00F8 EFFC 00FD EFFC 00F9 EFFC 00FD EFFC 00F3 EFFE 00FA EFFD 00F8 EFFC 00FD EFFC"
- $"00F9 EFFB 00FE EFFC 00E4 EF00 FFF2 0040 F900 00FF EDEF FD00 FDEF FC00 F7EF F700"
- $"F5EF F400 F9EF FB00 FEEF FC00 F7EF F200 F5EF FE00 FAEF FB00 FAEF FA00 01EF EFFD"
- $"00F7 EFFA 0001 EFEF FD00 E4EF 00FF F200 3BF9 0000 FFEB EFF8 00F4 EFFA 00F2 EFFC"
- $"0000 EFF9 00FB EFFA 0000 EFF9 00F7 EFFB 0001 EFEF FE00 F3EF FC00 FDEF F800 FBEF"
- $"F700 F4EF F600 E3EF 00FF F200 14F9 0000 FF81 EFDF EFFB 00EF EFFC 00DF EF00 FFF2"
- $"0014 F900 00FF 81EF DEEF FC00 EEEF FC00 E0EF 00FF F200 14F9 0000 FF81 EFDE EFFB"
- $"00EE EFFC 00E1 EF00 FFF2 0014 F900 00FF 81EF DDEF FC00 EDEF FC00 E2EF 00FF F200"
- $"14F9 0000 FF81 EFDC EFFB 00EE EFFB 00E4 EF00 FFF2 0014 F900 00FF 81EF DBEF FA00"
- $"EFEF FA00 E6EF 00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 000C F900 00FF 81EF A0EF"
- $"00FF F200 0CF9 0000 FF81 EFA0 EF00 FFF2 0008 F900 81FF 9EFF F200 0481 0087 0004"
- $"8100 8700 0481 0087 0004 8100 8700 0481 0087 0004 8100 8700 00FF"
- };
-
-
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used used for the sound status window. */
-
- resource 'WIND' (rStatusWindow, "Status dialog", purgeable) {
- {0, 0, kStatusWindowSizeH, kStatusWindowSizeW},
- documentProc, invisible, noGoAway, 0, "Sound Status", centerMainScreen
- };
-
- resource 'CNTL' (rCancelCntl, "Status dialog", purgeable) {
- { kStatusWindowSizeH - kStandardWhiteSpacing - kButtonSizeH, /* top */
- kStatusWindowSizeW - kStandardWhiteSpacing - kButtonSizeW, /* left */
- kStatusWindowSizeH - kStandardWhiteSpacing, /* bottom */
- kStatusWindowSizeW - kStandardWhiteSpacing /* right */
- }, 0, visible, 0, 0, pushButProc, 0, "Stop"
- };
-
- resource 'STR#' (sMessStrings, "Status dialog", purgeable) {
- {
- "Playing the sound asynchronously.";
- "Playing the sound asynchronously resampled to middle C.";
- "Playing a C major scale.";
- "Playing “Promenade” from Pictures At An Exhibition, by Mussorgsky.";
- "Playing middle C with the various timbres.";
- "Playing “Schaut, ihr Sünder” by Löwenstern, arranged by JS Bach.";
- }
- };
-
- /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- These are the resources used for the sound document window. This includes
- a string resource that is the name given to an untitled sound resource
- to appear in the list. */
-
- resource 'WIND' (rSoundWindow, "Document window", purgeable) {
- {0, 0, kSoundWindowSizeH, kSoundWindowSizeW},
- documentProc, invisible, goAway, 0, "", noAutoCenter
- };
-
- /* This rectangle is the position of the list in the document window. The rectangle
- is the size of the WIND inset by kStandardWhiteSpacing and to the left of the buttons. */
- resource 'RECT' (rListRectID, "Document window", purgeable) {
- {
- kStandardWhiteSpacing,
- kStandardWhiteSpacing,
- (kSoundWindowSizeH - kStandardWhiteSpacing),
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing - kSndListButGap)}
- };
-
- /* [1] */
- resource 'CNTL' (rPlaySndCntl, "Document window", purgeable) {
- {
- ((1 * kStandardWhiteSpacing) + (1 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((1 * kStandardWhiteSpacing) + (1 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Sound"
- };
-
- /* [2] */
- resource 'CNTL' (rHyperPlayCntl, "Document window", purgeable) {
- {
- ((2 * kStandardWhiteSpacing) + (2 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((2 * kStandardWhiteSpacing) + (2 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Hyper Play"
- };
-
- /* [3] */
- resource 'CNTL' (rPlayScaleCntl, "Document window", purgeable) {
- {
- ((3 * kStandardWhiteSpacing) + (3 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((3 * kStandardWhiteSpacing) + (3 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Scale"
- };
-
- /* [4] */
- resource 'CNTL' (rPlayMelodyCntl, "Document window", purgeable) {
- {
- ((4 * kStandardWhiteSpacing) + (4 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((4 * kStandardWhiteSpacing) + (4 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Play Melody"
- };
-
- /* [5] */
- resource 'CNTL' (rStopCntl, "Document window", purgeable) {
- {
- ((5 * kStandardWhiteSpacing) + (5 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((5 * kStandardWhiteSpacing) + (5 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Stop Sound"
- };
-
- /* [6] */
- resource 'CNTL' (rRecordCntl, "Document window", purgeable) {
- {
- ((6 * kStandardWhiteSpacing) + (6 * kSndButtonSizeH) - kSndButtonSizeH),/* top */
- (kSoundWindowSizeW - kSndButtonSizeW - kStandardWhiteSpacing), /* left */
- ((6 * kStandardWhiteSpacing) + (6 * kSndButtonSizeH)), /* bottom */
- (kSoundWindowSizeW - kStandardWhiteSpacing) /* right */
- }, 0, visible, 0, 0, pushButProcUseWFont, 0, "Record Sound"
- };
-
- resource 'STR ' (rUntitled, "Document window", purgeable) {
- "<untitled>"
- };
-
-
-